/*
  Copyright (c) 2009 by kRaw1er
  This file is part of M8J project
*/
#include "CInputWnd.h"

CInputWnd::CInputWnd(void)
{
}

CInputWnd::~CInputWnd(void)
{
}

BOOL CInputWnd::OnInitDialog(void)
{
	if (!CMzWndEx::OnInitDialog())
	{
		return FALSE;
	}

	m_Edit.SetID(MZ_IDC_EDIT);
	m_Edit.SetPos(0, 0, GetWidth(), GetHeight() - MZM_HEIGHT_TEXT_TOOLBAR);
	AddUiWin(&m_Edit);

	m_Toolbar.SetID(MZ_IDC_TOOLBAR);
	m_Toolbar.SetPos(0, GetHeight() - MZM_HEIGHT_TEXT_TOOLBAR, GetWidth(), MZM_HEIGHT_TEXT_TOOLBAR);
	m_Toolbar.SetButton(2, true, true, STR_BACK.c_str());
	m_Toolbar.SetButton(0, true, true, STR_DONE.c_str());
	AddUiWin(&m_Toolbar);

	return TRUE;
}

void CInputWnd::OnMzCommand(WPARAM wParam, LPARAM lParam)
{
	switch(LOWORD(wParam))
	{
	case MZ_IDC_TOOLBAR:
		if (lParam == 2)
		{
			EndModal(0);
		}
		if (lParam == 0)
		{
			EndModal(1);
		}
		break;

	}
}
